﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities;

namespace _2112A_2_MES._chubowen
{
    /// <summary>
    /// 生产工单表
    /// </summary>
    public class ProWorkOrder : Entity<int>
    {
        

        /// <summary>
        /// 记录ID
        /// </summary>
        public int RecordId { get; set; }

        /// <summary>
        /// 工单编号
        /// </summary>
        [StringLength(64)]
        public string? WorkOrderCode { get; set; }

        /// <summary>
        /// 工单名称
        /// </summary>
        [StringLength(255)]
        public string? WorkOrderName { get; set; }

        /// <summary>
        /// 工单来源
        /// </summary>
        [StringLength(64)]
        public string? OrderSource { get; set; }

        /// <summary>
        /// 来单提单号
        /// </summary>
        [StringLength(64)]
        public string? SourceCode { get; set; }

        /// <summary>
        /// 产品ID
        /// </summary>
        public int ProductId { get; set; }

        /// <summary>
        /// 产品编码
        /// </summary>
        [StringLength(64)]
        public string? ProductCode { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        [StringLength(255)]
        public string? ProductName { get; set; }

        /// <summary>
        /// 计量单位
        /// </summary>
        [StringLength(64)]
        public string? UnitOfMeasure { get; set; }

        /// <summary>
        /// 已生产数量
        /// </summary>
        public double? QuantityProduced { get; set; }

        /// <summary>
        /// 变更数量
        /// </summary>
        public double? QuantityChanged { get; set; }

        /// <summary>
        /// 已排程数量
        /// </summary>
        public double? QuantityScheduled { get; set; }

        /// <summary>
        /// 客户ID
        /// </summary>
        public int ClientId { get; set; }

        /// <summary>
        /// 客户编码
        /// </summary>
        [StringLength(64)]
        public string? ClientCode { get; set; }

        /// <summary>
        /// 客户名称
        /// </summary>
        [StringLength(255)]
        public string? ClientName { get; set; }

        /// <summary>
        /// 供应商ID
        /// </summary>
        public int VendorId { get; set; }

        /// <summary>
        /// 供应商编码
        /// </summary>
        [StringLength(64)]
        public string? VendorCode { get; set; }

        /// <summary>
        /// 供应商名称
        /// </summary>
        [StringLength(255)]
        public string? VendorName { get; set; }

        /// <summary>
        /// 批次编号
        /// </summary>
        [StringLength(64)]
        public string? BatchCode { get; set; }

        /// <summary>
        /// 需求日期
        /// </summary>
        public DateTime? RequestDate { get; set; }

        /// <summary>
        /// 父工单
        /// </summary>
        public int ParentId { get; set; }

        /// <summary>
        /// 所有父节点ID
        /// </summary>
        [StringLength(255)]
        public string? Ancestors { get; set; }

        /// <summary>
        /// 完成日期
        /// </summary>
        public DateTime? FinishDate { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        [StringLength(64)]
        public string? Status { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [StringLength(500)]
        public string? Remark { get; set; }

        /// <summary>
        /// 自定义字段1
        /// </summary>
        [StringLength(255)]
        public string? Attr1 { get; set; }

        /// <summary>
        /// 自定义字段2
        /// </summary>
        [StringLength(255)]
        public string? Attr2 { get; set; }

        /// <summary>
        /// 自定义字段3
        /// </summary>
        public int? Attr3 { get; set; }

        /// <summary>
        /// 自定义字段4
        /// </summary>
        public int? Attr4 { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        [StringLength(64)]
        public string? CreateBy { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 更新人
        /// </summary>
        [StringLength(64)]
        public string? UpdateBy { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }
    }
}
